package com.huluobo.a2202mvvm_im_douyindemo.conversation;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2202mvvm_im_douyindemo.mvvmBase.BaseViewModel;
import com.hyphenate.chat.EMConversation;

import java.util.List;

/**
 * Created by LC on 2024/4/26.
 */
public class ConversationViewModel extends BaseViewModel<ConversationRepo> {

    MutableLiveData<List<EMConversation>> getAllConversationsSuccess = new MutableLiveData<>();

    MutableLiveData<String> getAllConversationsFailed = new MutableLiveData<>();

    public void getAllConversations() {
        repo.loadConversations(getAllConversationsSuccess, getAllConversationsFailed);
    }

    @Override
    protected ConversationRepo createRepo() {
        return new ConversationRepo();
    }
}
